package com.Service;

import com.dao.TeaWorkloadMapper;
import com.entity.TeaWorkload;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeaWorkloadService {
    @Autowired
    private TeaWorkloadMapper teaWorkloadMapper;

    /**
     * 查询
     * @param teaWorkload
     * @return
     */
    public List<TeaWorkload> queryTeaWorkload(TeaWorkload teaWorkload){
        return teaWorkloadMapper.selectAll();
    }

    /**
     * 新增
     * @param teaWorkload
     * @return
     */
    public int addTeaWorkload(TeaWorkload teaWorkload){
        return teaWorkloadMapper.insert(teaWorkload);
    }

    /**
     * 删除
     * @param id
     * @return
     */
    public int delTeaWorkload(int id){
        return teaWorkloadMapper.deleteByPrimaryKey(id);
    }

    /**
     * 修改
     * @param teaWorkload
     * @return
     */
    public int updateTeaWorkload(TeaWorkload teaWorkload){
        return teaWorkloadMapper.updateByPrimaryKey(teaWorkload);
    }
}
